<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh">
<head>
<%@include file="../../commons/meta.jsp"%>
<link rel="stylesheet" href="${ctx}assets/plugins/pure/pure-min.css" media="all" />
<script type="text/javascript" src="${ctx}assets/plugins/plupload/2.2.1/js/plupload.full.min.js"></script>
<script type="text/javascript" src="${ctx}assets/plugins/plupload/2.2.1/js/i18n/zh_CN.js"></script>
<script type="text/javascript">
  debugs("${ctx} --- newscenter-add.jsp");
  function validateForm() {
    if (empty($("#forecastNum").val())) {
      alertError('请输入打包次数！');
      return false;
    }
    if(isNaN($("#forecastNum").val())){
      alertError('打包次数，请输入数字！');
      return false;
    }
    if (empty($("#price").val())) {
      alertError('请输入打包价格！');
      return false;
    }
    if(isNaN($("#price").val())){
      alertError('打包价格，请输入数字！');
      return false;
    }
    $("#forms").submit();
  }
  //  关闭弹出框 
  jQuery(document).ready(function() {
    $("#back_btn").click(function() {
      window.location.href = "${ctx}api/forecast-price/"
    });
  });
</script>
</head>
<body>
    <%@include file="../../commons/head.jsp"%>
    <div class="content">
        <%@include file="../../commons/menu.jsp"%>
        <!--右侧展示部分-->
        <div class="right-zq">
            <!--center content-->
            <div class="dynamic">
                <div class="role dynamiclayer" style="display: block;">
                    <div class="title orange2">
                        <span class="left">志愿管理</span> <label> > </label> <span>次数价格设置</span> <label> > </label> <span>添加</span>
                    </div>
                    <form class="" id="forms" method="post" action="${ctx}api/forecast-price/save">
                        <div class="news-table">
                            <table>
                                <tr>
                                    <td class="item">打包次数:</td>
                                    <td width="40%"><input class="p100" id="forecastNum" name="forecastNum" type="text" placeholder="请输入次数" value="" /></td>
                                </tr>
                                <tr>
                                    <td class="item">打包价格:</td>
                                    <td width="40%"><input class="p100" id="price" name="price" type="text" placeholder="请输入价格(元)" value="" /></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>
                                        <button class="orange2" type="button" onclick="validateForm()">保存&nbsp;<i class="fa fa-floppy-o"></i>
                                        </button> &nbsp;&nbsp;
                                        <button class="orange2" type="button" id="back_btn">返回&nbsp;<i class="fa fa-undo"></i>
                                        </button>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </form>
                </div>
            </div>
            <!--center content over-->
        </div>
    </div>
    <%@include file="../../commons/footpop.jsp"%>
    <!-- 页尾，提示消息 -->
    <jsp:include page="../../commons/foot_message.jsp"></jsp:include>
    <script>

    </script>
</body>
</html>
